package com.github.shuaidd.model.response;

import lombok.Data;

/**
 * 描述
 *
 * @author ddshuai
 * @date 2020-08-13 13:59
 **/
@Data
public class ResultObject<T> {
    private Integer status;
    private T data;
    private String msg;

    public static <T> ResultObject<T> ok(){
        ResultObject<T> resultObject = new ResultObject<>();
        resultObject.setStatus(1);
        return resultObject;
    }

    public static <T> ResultObject<T> ok(T data){
        ResultObject<T> resultObject = new ResultObject<>();
        resultObject.setStatus(1);
        resultObject.setData(data);
        return resultObject;
    }
}
